<!-- evaluate 页面内容 -->
<section class="evaluate" ng-controller="evaluateCtrl">
    <div class="row margin-reset">
        <div class="panel panel-default yf-shadow">
            <empty data='comments'></empty>
            <table class='table' ng-show="comments && comments.length > 0">
                <thead>
                    <tr>
                        <th class="col-sm-4 col-xs-4">
                            评价内容
                        </th>
                        <th class="col-sm-2 col-xs-2">
                            评分
                        </th>
                        <th class="col-sm-2 col-xs-3" ng-bind="user_role == 2 ? '评价人': '被评价人'">
                        </th>
                        <th class="col-sm-4 col-xs-3">
                            订单信息
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="comment in comments track by $index">
                        <td>
                            <p>{{ comment.content }}</p>
                            <div class="time">{{ comment.created_at * 1000 | date: 'yyyy-MM-dd HH:mm' }}</div>
                        </td>
                        <td ng-bind="comment.raty"></td>
                        <td class="link" ng-if="user_role == 2">
                            <a href="javascript:void(0)">
                          {{comment.customer_name}}
                        </a>
                        </td>
                        <td class="link" ng-if="user_role != 2">
                            <a href="javascript:void(0)">
                          {{comment.user_name}}
                        </a>
                        </td>
                        <td class="link" ui-sref="orderDetail({id: comment.order_info.id})">
                            <a href="javascript:void(0)">
                        {{ comment.order_info.square }}(㎡)|{{ comment.order_info.company_name }}
                      </a>
                        </td>
                    </tr>
                </tbody>
            </table>
            <nav ng-show="comments && comments.length != 0 && page.total_count > limit">
                <ul class="pager pager-sm yf-pager">
                    <li>
                        <a class="btn btn-default" ng-disabled="!((page.current_page - 1) >= 1)" ng-click="getPage(page.current_page - 1);">上一页</a>
                    </li>
                    <li>
                        <a class="btn btn-default" ng-disabled="!page.next_page" ng-click="getPage(page.next_page);">下一页</a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</section>
